import { createRouter, createWebHistory } from 'vue-router'

const routes = [
  {
    path: '/',
    name: 'home',
    component: () => import('../views/HomeView.vue')
  },
  {
    path: '/resources',
    name: 'resources',
    component: () => import('../views/ResourceView.vue')
  },
  {
    path: '/detail/:id',
    name: 'detail',
    component: () => import('../views/ResourceDetailView.vue')
  },
  {
    path: '/upload',
    name: 'upload',
    component: () => import('../views/UploadView.vue')
  },
  {
    path: '/manage',
    name: 'manage',
    component: () => import('../views/Manage.vue')
  },

  {
    path: '/about',
    name: 'test',
    component: () => import('../views/Test.vue')
  }
]

const router = createRouter({
  history: createWebHistory(),
  routes
})

export default router
